﻿var formatPriority = function (elCell, oRecord, oColumn, sData) {
    var showText;
    if (sData == "1") {
        showText = "<font color='red'>特急</font>";
    } else if (sData == "2") {
        showText = "<font color='green'>紧急</font>";
    } else {
        showText = "普通";
    }
    elCell.innerHTML = showText;
}

var formatShow = function (elCell, oRecord, oColumn, sData) {
    var WorkFlowInstanceId = oRecord.getData("WorkFlowInstanceId");
    var workflowId = oRecord.getData("WorkFlowId");
    var taskCaption = oRecord.getData("TaskCaption");
    var url = '"' + "../../Crm/BasePages/WorkflowMap.aspx?WorkFlowInstanceId=" + WorkFlowInstanceId + "&workflowId=" + workflowId + '"';
    var title = '"' + taskCaption + '流程图"';
    elCell.innerHTML = "<a href='javascript:transForForm(" + title + "," + url + ")'>流程图</a><br />";
}
var transForForm = function (title, url) {
    parent.addTabs(title, url);
    parent.NeedRefreshPage = this;
}
var formatCaption = function (elCell, oRecord, oColumn, sData) {
    var WorkTaskInstanceId = oRecord.getData("WorkTaskInstanceId");
    var OperatorInstanceId = oRecord.getData("OperatorInstanceId");
    var url = '"' + "../../Crm/BasePages/WorkTaskCtrlPage.aspx?WorkTaskInstanceId=" + WorkTaskInstanceId + "&OperatorInstanceId=" + OperatorInstanceId + '"';
    var title = '"' + sData + '"';
    elCell.innerHTML = "<a href='javascript:transForForm(" + title + "," + url + ")'>" + sData + "</a><br />";
}
//自动义双击方法
function CustomDbClick() { }